home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr27 / gs26.zip / UNIX-LPR.DOC < prev    next >
Text File  |  1993-05-07  |  6KB  |  128 lines

  1.     NOTE: this file was contributed by a user: please contact
  2.     George Cameron <george@bio-medical-physics.aberdeen.ac.uk>
  3.     if you have questions.
  4.  
  5. Help on setting up an lpr filter for Ghostscript
  6. ================================================
  7.  
  8. OVERVIEW:
  9.  
  10.  "How do I set up Ghostscript to provide postscript queues in a standard lpr
  11.  environment on Unix systems" appears as a Frequently Asked Question amongst
  12.  Ghostscript users, and the following utilities are designed to make this
  13.  task a little easier. The files supplied are:
  14.  
  15.  unix-lpr.doc:    this file
  16.  unix-lpr.sh:    a flexible, multi-option print filter shell script
  17.  lprsetup.sh:    a shell script which sets up soft links and creates a
  18.         template insert for the printcap file
  19.  
  20.  
  21. WHAT IT CAN DO:
  22.  
  23.  The print filter resides in the standard Ghostscript installation directory
  24.  (eg. /usr/local/lib/ghostscript), together with a dummy filter directory
  25.  containing various soft links which point to the filter. It offers the
  26.  following features:
  27.  
  28.     o  Multiple devices supported by a single filter
  29.     o  Multiple bit-depths for the same device
  30.     o  Direct (single-queue) and indirect (two-queue) setup
  31.     o  Support for the standard preprocessing filters if you have the
  32.         corresponding (whatever)-to-postscript translators
  33.     o  Redirection of diagnostic and programmed output to a logfile in 
  34.         the spooling directory
  35.     o  Maintaining of printer accounting records of the numbers of pages
  36.         printed by each user (compatible with the 'pac' command)
  37.     o  Straightforward editing for further customisation
  38.  
  39.  
  40. SETTING IT UP:
  41.  
  42.  The mkfilt.sh script needs to have two lines edited before running, to set
  43.  the printer devices to use and the list of filters available. With this
  44.  information, it will:
  45.  
  46.     o  Create a 'filt' subdirectory of the standard Ghostscript
  47.         installation directory
  48.     o  Create the links in this directory which enable the filter to
  49.         determine the parameters for running Ghostscript
  50.     o  Automatically generate printcap entries which should need only
  51.         a little editing before adding to your system printcap file
  52.  
  53.  
  54. EDITING THE DEVICE LIST:
  55.  
  56.  At the top of mkfilt.sh, you will find a line of the form DEVICES=" ... ".
  57.  This should be edited to replace the example list with your own list of 
  58.  devices, with each entry comprising the name of the device, follwed by two
  59.  optional additional fields, separated by dots.
  60.  
  61.  The first field is only required if the printer device understands the
  62.  qualifier -dBitsPerPixel=.., which only applies to colour devices (and at
  63.  present is only supported by the cdj* and pj* family of printers). For
  64.  a particular number <N> of bits per pixel, add the suffix .<N> to the
  65.  device name, eg. cdj500.3 cdj500.24 etc.
  66.  The second field is required if you wish to use two separate queues for the
  67.  device, a 'raw' queue as well as the postscript queue (see discussion below).
  68.  If this is required, you should add the suffix .dq ('dual-queue') to the name,
  69.  whether or not a bits-per-pixel suffix has already been added.
  70.  
  71.  Thus, the following list supports a cdj550 device at 3 different bit-depths
  72.  (24 bpp, 3 bpp and 1 bpp), with a dual-queue (ie. separate queue for the raw
  73.  data); a monochrome deskjet device with a single queue; and a djet500 device
  74.  using a separate queue:
  75.  
  76.  DEVICES="cdj550.24.dq cdj550.3.dq cdj550.1.dq deskjet djet500.dq"
  77.  
  78.  
  79. EDITING THE FILTER LIST:
  80.  
  81.  The standard list contains only the generic 'if' filter, although there
  82.  is a commented-out list showing the other filters which you may have 
  83.  available. If you wish to use the support for these filters, you may
  84.  need to edit the bsd-if file to add the directories where the translators
  85.  are stored to the PATH, or to change the names of the filters if yours
  86.  are different.  The bsd-if script is supplied with an example setup
  87.  using Transcript (a commercial package from Adobe), and PBMPLUS, a PD
  88.  package by Jeff Poskanzer and others.
  89.  
  90.  
  91. MODIFIYING THE PRINTCAP.INSERT:
  92.  
  93.  Running the mkfilt.sh script generates a file called printcap.insert, which
  94.  has a template setup for your printer queues. It cannot guarantee to do the
  95.  whole job, and you will probably need to consult your system documentation
  96.  and edit this file before you add it to your printcap file. The file has
  97.  been set up for serial printers, as these most often cause problems in 
  98.  getting binary data to the printer. The setup is not guaranteed to be
  99.  correct, but it works on my system! You may well need to change the baud
  100.  rate, or the hardware/software handshaking used. Only a small change is
  101.  required to edit the printcap to use a networked remote printer instead of
  102.  a direct serial printer, and an example is given in the printcap.insert file.
  103.  
  104.  
  105. SINGLE OR DUAL QUEUES:
  106.  
  107.  If you wish to provide a postscript-only queue (eg. so that all pages
  108.  printed go through the accounting!), and the printer port is local to the
  109.  host machine, a single queue is appropriate - Ghostscript simply converts
  110.  the postscript into the printer's native data format and sends it to the
  111.  port. If the printer is on a remote networked machine (another workstation,
  112.  or a PC), or if you need to send raw printer data to the printer, you will
  113.  need to use two queues. Simply specify the '.dq' option above.
  114.  
  115.  
  116. BUGS:
  117.  
  118.  You will need write access to the ghostscript installation directory (eg.
  119.  /usr/local/lib/ghostscript) in order for mkfilt.sh to create the filt
  120.  directory and soft links.
  121.  
  122.  You must list all instances of a device (if you have multiple bits-per-
  123.  pixel for the same device) as adjacent items in the device list - if you
  124.  do not, the printcap.insert will contain multiple entries for the same
  125.  device.
  126.  
  127.  Multiple instances of the same device are not supported at present.
  128.